#ifndef _LED_FUNC_H_
#define _LED_FUNC_H_
#include "stdint.h"
typedef void (*led_ON_OFF_FUN)(void);
typedef struct led_func
{
    uint8_t mode;
    uint8_t status; // 0 1,2,3,
    uint8_t current_tickets;
    uint8_t remain_tickets;
    led_ON_OFF_FUN led_on;
    led_ON_OFF_FUN led_off;
} LED_FUNC_ST;
typedef enum
{
    LED_OFF,
    LED_ON,
    FLASH_LONG_AVERAGE,          // ON20 OFF20
    FLASH_SHORT_AVERAGE,         // ON5 OFF5
    FLASH_FAST,                  // ON2 OFF2
    FLASH_LONG_SHORT,            // ON20 OFF5
    FLASH_SHORT_LONG,            // ON5 OFF20
    FLASH_SHORT_SHORT_LONG_LONG, // ON5 OFF5 ON 20 OFF 20
    FLASH_LONG_LONG_LONG_SHORT,  // ON20 OFF20 ON 20 OFF5
    FLASH_SHORT_SHORT_SHORT_LONG // ON5 OFF5 ON 5 OFF20
} LED_STATUS_DPT;
typedef enum
{
    SYSTEM_LED = 0,
    NET_STATUS_LED,
    WARNING_LED
} LED_INDEX_DPT;
extern LED_FUNC_ST led_func_st[3];
void register_led_interface(uint8_t index, uint8_t mode, led_ON_OFF_FUN led_on, led_ON_OFF_FUN led_off);
void led_blink_cycle(void);
void led_blink_excute(LED_FUNC_ST *led_fs);
void set_led_blink_mode(uint8_t index, uint8_t mode);
#endif
